{% extends 'ApiCloud/Base/layout.common.html.twig' %}

{% block body %}
    {% include "ApiCloud/Base/inc.head.light.html.twig" with {title:"提现",back:1} %}
    <mu-tabs :value.sync="curTab" change="tab" indicator-color="orange400" inverse full-width>
        <mu-tab>
            <div class="c12 fs8">申请提现</div>
        </mu-tab>
        <mu-tab>
            <div class="c12 fs8">提现记录</div>
        </mu-tab>
    </mu-tabs>
    <div v-if="curTab == 0">
        <div class="bcf fs9 bdtso pad10 lh2 c12 ">
            <div>提现金额</div>
            <div class="padt20 padb20 bdbda flrc">
                <div class="fs24 c11">￥</div>
                <div class="flex1"><input v-model="money" class="fs14" type="text" placeholder="请输入提现金额"></div>
            </div>
            <div class="c12 op7 padt3 fs7">
                提交审核后需要等待人工审核！请耐心等待
            </div>
            <div class="">提现账号</div>
            <div class="">

                <div class="mar5 bdda round5 pad10 tac" v-if="!isTrue(card)">
                    暂无提现账号，现在添加
                </div>

                <div v-if="!isTrue(card)">
                    <div class="flrc pad5">
                        <div>机构名称：</div>
                        <div class="flex1"><input v-model="en.bank" class="tar" type="text" placeholder="银行名称、支付宝、微信等"></div>
                    </div>

                    <div class="flrc pad5">
                        <div>开户行：</div>
                        <div class="flex1"><input v-model="en.bankAddress" class="tar" type="text" placeholder="银行转账时必填"></div>
                    </div>

                    <div class="flrc pad5">
                        <div>账号名称：</div>
                        <div class="flex1"><input v-model="en.name" class="tar" type="text" placeholder="请输入账号名称、姓名"></div>
                    </div>

                    <div class="flrc pad5">
                        <div>账号：</div>
                        <div class="flex1"><input v-model="en.card" class="tar" type="text" placeholder="银行账号、支付宝账号、微信账号"></div>
                    </div>
                    <div class="padtb5">
                        <mu-button round large color="primary" full-width @click="addCard">添加</mu-button>
                    </div>
                </div>

                <div class="fs8 mar5 bdso round3 pad5 card c13"  v-if="isTrue(card)">
                    <div class="flrc">
                        <div class="flex1">银行名称：</div>
                        <div>[[card.bank]]</div>
                    </div>
                    <div class="flrc">
                        <div class="flex1">开户行：</div>
                        <div>[[card.bankAddress]]</div>
                    </div>
                    <div class="flex-r flex-end">
                        <div class="flex1">账号名称：</div>
                        <div class="">[[card.name]]</div>
                    </div>
                    <div class="flex-r flex-end">
                        <div class="flex1">银行账号：</div>
                        <div class="fs12 fwb" v-text="card.card"></div>
                    </div>

                    <div class="padtb5 flex-r flex-end">
                        <mu-button round  color="primary" small @click="card = false">修改账户</mu-button>
                    </div>

                </div>
            </div>
        </div>
        <div class="pad10">
            <mu-button @click="doCash()" color="success" full-width large round>提交申请</mu-button>
        </div>
        <div class="padt10 tac c12 ">常用账号</div>

        <div>
            <div class="fs8 mar5 bdso round3 pad5 card c13"  v-for="item in cards">
                <div class="flrc">
                    <div class="flex1">银行名称：</div>
                    <div>[[item.bank]]</div>
                </div>
                <div class="flrc">
                    <div class="flex1">开户行：</div>
                    <div>[[item.bankAddress]]</div>
                </div>
                <div class="flex-r flex-end">
                    <div class="flex1">账号名称：</div>
                    <div class="">[[item.name]]</div>
                </div>
                <div class="flex-r flex-end">
                    <div class="flex1">银行账号：</div>
                    <div class="fs12 fwb" v-text="item.card"></div>
                </div>

                <div class="padtb5 flex-r flex-end">
                    <mu-button round  color="primary" small @click="useThis(item)">使用此账户</mu-button>
                </div>

            </div>
        </div>

    </div>

    <div v-if="curTab == 1">
        <div class="bcf mar10 bdbda ofh fs8" v-for="item in log">
            <div class="flrc">
                <div class="padlr9 padtb3 c11">
{#                    [[item.status]]#}
                    <span class="c12 " v-if="item.status == 0">等待审核</span>
                    <span class="c01 " v-if="item.status == 1">已处理</span>
                    <span class="c02 " v-if="item.status == 2">驳回</span>
                </div>
                <div class="flex1 tar padr5 c12">[[str2time(item.createAt)]]</div>
            </div>
            <div class="flrc pad3">
                <div class="flex1 c12 padl5">[[item.message == ''?"等待审核":item.message]]</div>
                <div class="fs12 c11 padtb3 fwb">
                    <span>[[item.money]]</span>
                </div>
            </div>
        </div>
    </div>


{% endblock %}
